<?php

/**
 * Represents this plugin.
 */
$plugin = elgg_get_plugin_from_id('mtcd');

/**
 * List of settings for this plugin.
 */
$settings = $plugin->getAllSettings();

echo "<label>WordNet binary location</label><br />";
echo "<span>(ex. /usr/bin/wn or C:\Program Files\WordNet\2.1\bin\wn.exe)</span><br />";
echo "<br />";

echo elgg_view('input/text', array(
        'class' => 'elgg-input-text',
		'id' => 'path_wn',
		'name' => 'params[path_wn]',
		'value' => $settings['path_wn'],
));
echo "<br />";
echo "<br />";

echo "<label>Weka library location</label><br />";
echo "<span>(ex. /usr/share/java/weka.jar or C:\Program Files\Weka-3-6\weka.jar)</span><br />";
echo "<br />";

echo elgg_view('input/text', array(
        'class' => 'elgg-input-text',
		'id' => 'path_jar',
		'name' => 'params[path_weka]',
		'value' => $settings['path_weka'],
));
echo "<br />";
echo "<br />";
echo "<label>Recommend</label>"; 
echo "<br />";
echo "<br />";

/**
 * List of entities that can be checked to be recommended.
 */
$entity_names = array('user','group','blog','file','bookmars','page');

/**
 * List of entities checked in the past.
 */
$recommender_enity = array();
foreach ($entity_names as $entity_name) {
	if(isset($settings['recommender_' . $entity_name]) && $settings['recommender_' . $entity_name] == 'true') {
		array_push($recommender_enity,$entity_name);
	}
}

echo elgg_view('input/checkboxes',array(
		'disabled' => false, 
		'name' => 'params[checkbox_recommender_entity]',
		'options' => array('Users'=>$entity_names[0],'Groups'=>$entity_names[1],'Blogs'=>$entity_names[2],'Files'=>$entity_names[3],'Bookmarks'=>$entity_names[4],'Pages'=>$entity_names[5]),
		'value' => $recommender_enity,
));
echo "<br />";
echo "<br />";


?>